package top.swimmer.tokenizer;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

public class ObjectDemo {
    public static void main(String[] args) throws Exception {
        Too t = new Too();
        File file = new File(ObjectDemo.class.getResource("/aaa.json").getFile());

        ObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(file));
        output.writeObject(t);
        ObjectInputStream input = new ObjectInputStream(new FileInputStream(file));
        Too t1 = (Too) input.readObject();
        System.out.println();
    }
}
